-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warn if no remote validator was specified #602
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM @koplas I have reworked the exit code doc part to make it more clear that the bits are superposed .. Its a bit technical .. so if you have a better wording?
Most documentations have a table with a Hex Mask, but this is even more technical. This approach seems good enough for me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a return from run() with error condition set with lead to os.exit(1), but 1 always means exitCodeSchemaInvalid
so each codepath for this should be checked and either commented or changed.
I just noticed the documentation for the exit code is wrong. |
To get this consistent: Do we have a first bit set in all error cases (like the documentation suggests) or only when there is no other error? Do we have the other bits set in case of general error? Do we get log output on all errors or only on general errors (as the documentation suggests)? |
If a general error occurs, all other bits besides the general error bit are unset. I extended the documentation to make this more explicit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Certain errors will stop the check between local and remote validator without any comment indicating that the remote validation is completely skipped, which may lead to the wrong impression that the remote validation was succesful.
For example, removing the first '{' on a valid document will cause the IDMatchesFilename function to throw an error and the continue will wordlessly skip remote validation. The exit code will then imply that the remote check was succesful.
This makes it consistent with the handling of schema validation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than #602 (review), works
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This is now correctly documented.
Prints a warning if no remote validator was configured.
Closes #601